<?php

class ActivitySevenEventSignedAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * 七日签到活动的签到和补签
     * @param int $userId
     * @param int $indexId
     * @param int $isFree 1: 普通签到 0：补签
     * @param int $reqTime
     * @return SzResponse
     */
    public function execute($userId, $indexId, $isFree, $reqTime)
    {
        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        return $this->buildResponse([
            ActivitySevenEventService::get()->signed($userId, $indexId, $isFree, $reqTime)
        ]);
    }
}